<!doctype html>
<style>

#x  td:nth-child(-n+1)
{
	color: blue
}

#y  td:nth-child(2 of .a)
{
	color: blue
}

</style>

<table id=x> <td>blue <td>black </table>

<table id=y> <td>black <td class=a>black <td class=a>blue </div>